package com.haixiaoke.saas.bill.service.impl;

import java.util.List;

import com.haixiaoke.saas.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haixiaoke.saas.bill.mapper.HouseBillItemMergeMapper;
import com.haixiaoke.saas.bill.domain.HouseBillItemMerge;
import com.haixiaoke.saas.bill.service.IHouseBillItemMergeService;

/**
 * 入住账单收费项目Service业务层处理
 *
 * @author qixi
 * @date 2024-05-30
 */
@Service
public class HouseBillItemMergeServiceImpl implements IHouseBillItemMergeService {
    @Autowired
    private HouseBillItemMergeMapper houseBillItemMergeMapper;

    /**
     * 查询入住账单收费项目
     *
     * @param mergeId 入住账单收费项目主键
     * @return 入住账单收费项目
     */
    @Override
    public HouseBillItemMerge selectHouseBillItemMergeByMergeId(Long mergeId) {
        return houseBillItemMergeMapper.selectHouseBillItemMergeByMergeId(mergeId);
    }

    /**
     * 查询入住账单收费项目列表
     *
     * @param houseBillItemMerge 入住账单收费项目
     * @return 入住账单收费项目
     */
    @Override
    public List<HouseBillItemMerge> selectHouseBillItemMergeList(HouseBillItemMerge houseBillItemMerge) {
        return houseBillItemMergeMapper.selectHouseBillItemMergeList(houseBillItemMerge);
    }

    /**
     * 新增入住账单收费项目
     *
     * @param houseBillItemMerge 入住账单收费项目
     * @return 结果
     */
    @Override
    public int insertHouseBillItemMerge(HouseBillItemMerge houseBillItemMerge) {
        houseBillItemMerge.setCreateTime(DateUtils.getNowDate());
        return houseBillItemMergeMapper.insertHouseBillItemMerge(houseBillItemMerge);
    }

    /**
     * 修改入住账单收费项目
     *
     * @param houseBillItemMerge 入住账单收费项目
     * @return 结果
     */
    @Override
    public int updateHouseBillItemMerge(HouseBillItemMerge houseBillItemMerge) {
        houseBillItemMerge.setUpdateTime(DateUtils.getNowDate());
        return houseBillItemMergeMapper.updateHouseBillItemMerge(houseBillItemMerge);
    }

    /**
     * 批量删除入住账单收费项目
     *
     * @param mergeIds 需要删除的入住账单收费项目主键
     * @return 结果
     */
    @Override
    public int deleteHouseBillItemMergeByMergeIds(Long[] mergeIds) {
        return houseBillItemMergeMapper.deleteHouseBillItemMergeByMergeIds(mergeIds);
    }

    /**
     * 删除入住账单收费项目信息
     *
     * @param mergeId 入住账单收费项目主键
     * @return 结果
     */
    @Override
    public int deleteHouseBillItemMergeByMergeId(Long mergeId) {
        return houseBillItemMergeMapper.deleteHouseBillItemMergeByMergeId(mergeId);
    }

    @Override
    public int batchInsertHouseBillItemMerges(List<HouseBillItemMerge> houseBillItemMerges) {
         return houseBillItemMergeMapper.batchInsertHouseBillItemMerges(houseBillItemMerges);
    }

    @Override
    public List<HouseBillItemMerge> selectHouseBillItemMergeByBillId(String billId) {
        return houseBillItemMergeMapper.selectHouseBillItemMergeByBillId(billId);
    }

    @Override
    public int batchUpdateHouseBillItemMerges(List<HouseBillItemMerge> collect) {
        return houseBillItemMergeMapper.batchUpdateHouseBillItemMerges(collect);
    }

    @Override
    public List<HouseBillItemMerge> selectHouseBillItemMergeByBillIds(List<String> billIds) {
        return houseBillItemMergeMapper.selectHouseBillItemMergeByBillIds(billIds);
    }


}
